#ifndef PLAYERCONTROLLER_H
#define PLAYERCONTROLLER_H

#include "object.h"
#include <vector>
#include "../entity.h"
#include <QObject>

class PlayerController : public Object
{
protected:
    int resources;
    Entity *selected;
    int team;
public:
    PlayerController(int tm);
    void saveState();

    void load();

    void addResources(int amt) {resources += amt;}

    int getResources() {return resources;}
    int getTeam() {return team;}

    Entity *getSelected() {return selected;}
    void setSelected(Entity *ent) {selected = ent;}

    void update();
};

class ComputerController : public QObject, public PlayerController {

    Q_OBJECT

    int numTanks;
    int numTrucks;
public:
    ComputerController(int tm);

    //void update();

signals:
    void createTank(int, int, int);
};

#endif // PLAYERCONTROLLER_H
